using System;
using System.Collections;

namespace SystemFrameworks.Util
{
	/// <summary>
	/// Summary description for ErrorMessageConst.
	/// </summary>
	public class ErrorMessageConst
	{
		private static Hashtable hsErrMessage =new Hashtable();

		//TEMA Request form
		private const string E0100="You have already requested the TEMA on the day!";
		private const string E0090="Can't get the basic Cost center information from the CostCenter table!";

		//js use
		private const string E0080="Do you really want to delete?";
		private const string E0081="Maker and Checker should not be the same one!";
		private const string E0082="The applied date must be in the latest three month!";
		private const string E0083="The start date or time is empty!";
		private const string E0084="The end date or time is empty!";
		private const string E0085="The Session Id has expired!";
		private const string E0086="The Start Date Time is incomplete!";
		private const string E0087="The End Date Time is incomplete!";
		private const string E0088="You should choose the Approve Option!";

		// check
		private const string E0040="The specified {0} has already existed in the check list!";
		private const string E0050="The specified Id has already existed in the check list!";
		private const string E0051="The specified data has been deleted by others !";
		private const string E0052="The specified data has been edited by others !";
		private const string E0053="There are some staffs in this role!";
		private const string E0054="There are some sub modules in this module!";
		private const string E0055="There are some sub departments in this department!";
		private const string E0056="The department is in use!";
		private const string E0057="The applied soeid  has already been in the check list ,Please wait!";

		//get Control sys table
		private const string E0030="Can't get the basic HireType information from the table!";
		private const string E0031="Can't get the basic available information from the table!";
		private const string E0032="Can't get the basic Vendor information from the vendor table!";
		private const string E0033="Can't get the basic Vendor information from the position table!";
		private const string E0034="Can't get the basic Team information from the team table!";
		private const string E0035="Can't get the basic cost center information from the cost center table!";
		private const string E0036="Can't get the basic department information from the department table!";
		private const string E0037="Can't get the basic branch information from the branch table!";

		//pageBase
		private const string E0020="You have not been authorized to access this page!";

		private const string E0021="Fail to create process TEMA!";
		private const string E0022="You can't go to the page directly!";
		private const string E0023="Fail to update process TEMA!";

		//login module
		private const string E0010="The specified user is null!";	
	 
		//logDb business module
		private const string E0001="The input log object is null!";

		public ErrorMessageConst()
		{

		}

		/// <summary>
		/// init the HashTable
		/// </summary>
		private static void initHashTable()
		{
			hsErrMessage.Clear();
			hsErrMessage.Add("E0001",E0001);		
			hsErrMessage.Add("E0010",E0010);		
			hsErrMessage.Add("E0020",E0020);	
			hsErrMessage.Add("E0021",E0021);	
			hsErrMessage.Add("E0022",E0022);	
			hsErrMessage.Add("E0023",E0023);	

			hsErrMessage.Add("E0030",E0030);	
			hsErrMessage.Add("E0031",E0031);	
			hsErrMessage.Add("E0032",E0032);	
			hsErrMessage.Add("E0033",E0033);	
			hsErrMessage.Add("E0034",E0034);	
			hsErrMessage.Add("E0035",E0035);	
			hsErrMessage.Add("E0036",E0036);
			hsErrMessage.Add("E0037",E0037);
			hsErrMessage.Add("E0040",E0040);
			hsErrMessage.Add("E0050",E0050);
			hsErrMessage.Add("E0051",E0051);		
			hsErrMessage.Add("E0052",E0052);	
			hsErrMessage.Add("E0053",E0053);	
			hsErrMessage.Add("E0054",E0054);		
			hsErrMessage.Add("E0055",E0055);		
			hsErrMessage.Add("E0056",E0056);	
			hsErrMessage.Add("E0057",E0057);

			hsErrMessage.Add("E0080",E0080);	
			hsErrMessage.Add("E0081",E0081);	
			hsErrMessage.Add("E0082",E0082);
			hsErrMessage.Add("E0083",E0083);
			hsErrMessage.Add("E0084",E0084);
			hsErrMessage.Add("E0085",E0085);
			hsErrMessage.Add("E0086",E0086);
			hsErrMessage.Add("E0087",E0087);
			hsErrMessage.Add("E0088",E0088);

			hsErrMessage.Add("E0090",E0090);	
			hsErrMessage.Add("E0100",E0100);	
		}

		/// <summary>
		/// get the error message by the error no
		/// </summary>
		/// <param name="errMsgNo"></param>
		/// <returns></returns>
		public static string  getErroMsgByNo(string errMsgNo)
		{
			initHashTable();
			return hsErrMessage[errMsgNo].ToString();		
		}

	}
}
